﻿using System;
using System.Collections.Generic;
using System.Text;
using T.FAS.Runtime.Metadata.Entity;

namespace T.FAS.Runtime.Metadata.SPI
{
    /// <summary>
    /// 元数据序列化接口
    /// </summary>
    public interface IMetaDataSerializer
    {
        /// <summary>
        /// 序列化为字符串
        /// </summary>
        /// <param name="metadata">元数据</param>
        /// <param name="serializeType">序列化方式</param>
        /// <returns>元数据字符串</returns>
        string SerializeObject(IMetaDataContent metadata, MetadataSerializeType serializeType);

        /// <summary>
        /// 反序列化为元数据
        /// </summary>
        /// <param name="metaDataString">元数据字符串</param>
        /// <param name="serializeType">序列化方式</param>
        /// <returns>元数据</returns>
        IMetaDataContent DeserializeObject(string metaDataString, MetadataSerializeType serializeType);
    }
}
